<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../assets/js/vue.js"></script>
</head>
<body>

    <script>
        function CreateFun(template){
            
            let User=function(name,age){
                this.name=name;
                this.age=age;
                this.template=template;
            }
            return User;
        }
        let User=CreateFun("<h1>模板</h1>");
        let u1=new User("jack",23);
        let u2=new User("tom",18);
        console.log(u1);
        console.log(u2);
        console.log(User);
    </script>
</body>
</html>